<!DOCTYPE html >
<html>
<head>
<meta name="Generator" content="tpshop" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>{$tpshop_config['shop_info_store_title']}</title>
<meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
<meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<include file="Public/meta"/>
<link rel="stylesheet" href="__STATIC__/css/public.css">
<link rel="stylesheet" href="__STATIC__/css/flow.css">
<link rel="stylesheet" href="__STATIC__/css/style_jm.css">
    <script type="text/javascript" src="__STATIC__/js/jquery-1.10.1.min.js"></script>

<!--<script src="__STATIC__/js/jweixin-1.2.0.js"></script>-->
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js" ></script>
</head>
<body style="background:#fff;position:relative;">


<div class="screen-wrap fullscreen login">
<form action="{:U('Mobile/Payment/getCode')}" method="post" name="cart4_form" id="cart4_form">
<div class="content_success " >
    <div class="con-ct   fo-con">
        <h4 class="successtijiao"><i class="icon iconfont icon-tuijian"></i>订单已经提交成功！</h4>
      <ul class="ct-list">
       
        <li >订单号：<em>{$order['order_sn']}</em></li>

          <if condition="$order[type_id] eq 2">
              <li >进入时间：<em>{$order['start_time']|date='Y-m-d H:i:s',###}</em></li>
              <li >出去时间：<em>{$order['end_time']|date='Y-m-d H:i:s',###}</em></li>
              <php>$js_time=ceil(($order['end_time']-$order['start_time'])/60);</php>
              <li >共计时长：<em>{$js_time}分钟</em></li>
          </if>

        <li>支付金额：<em style="color:#63dc31;">￥{$order['order_amount']}</em></li>         
      </ul>
    </div>
    
   <section class="order-info" style="display:none;">
          <div class="order-list">
            <div class="content ptop0">
              <div class="panel panel-default info-box">
                <div class="panel-body" id="pay_div"  >
                  <div class="title" id="zhifutitle" style="border-bottom:1px solid #eeeeee;">
                      <span class="i-icon-arrow-down i-icon-arrow-up" id="zhifuip"></span>
                      <span class="text">支付方式</span>
                      <a href="javascript:void(0)" title="修改商品列表" class="link">必选</a>
                      <em class="qxz" id="emzhifu">请选择支付方式</em>
                  </div>
                  <ul class="nav nav-list-sidenav" id="zhifu68" style="display:block; border-bottom:none;">

                      <!--<li class="clearfix" name="payment_name">-->
                          <!--<label>-->

                              <!--<div class="fl shipping_title">-->
                                  <!--<img src="/Template/pc/default/Static/images/weixinpay.gif"   width="110" height="40" />-->
                              <!--</div>-->
                          <!--</label>-->
                      <!--</li>-->

            <!--<input  name="pay_radio" type="hidden" value="weixin"/>-->


                  <foreach name="paymentList" item="v"  key="k"> 
                    <li class="clearfix" name="payment_name">
                      <label>
                          <!--<input type="radio"  onchange="get_h5_pay()" value="pay_code={$v['code']}" class="c_checkbox_t" name="pay_radio" />-->
                          <input type="radio"    value="pay_code={$v['code']}" checked class="c_checkbox_t" name="pay_radio" />
                          <div class="fl shipping_title">
	                          <img src="/plugins/{$v['type']}/{$v['code']}/{$v['icon']}" onClick="change_pay(this);" width="110" height="40" />
                          </div>
                      </label>
                    </li>
                   </foreach> 
                  </ul>
                </div>
              </div>
            </div>
          </div>
        </section>

  <div class="pay-btn">
	<input type="hidden" name="order_id" id="order_id" value="{$order['order_id']}" />
    <a href="javascript:pay();"  id="get_pay" class="sub-btn btnRadius">去支付</a>
  </div>
</div>
</form>



   <!-- <script>
        var ua = navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i)=="micromessenger") {//从微信中打开
            if (!window.WeixinJSBridge || !WeixinJSBridge.invoke) {
                if(window.__wxjs_environment === 'miniprogram'){ // 当前为小程序
                    //小程序
                    $('#get_pay').hide();
                    var path = '../wxPay/wxPay?order_id=' + $('#order_id').val();
                    //通过JSSDK的api使小程序跳转到指定的小程序页面
                    wx .miniProgram.navigateTo({url: path});
                }
            }
        }
    </script> -->



    <script>
    $(document).ready(function(){




            <if condition="$browserside eq 'wxmini'" >
                $('#get_pay').hide();
                var path = '../wxPay/wxPay?order_id=' + $('#order_id').val();
                //通过JSSDK的api使小程序跳转到指定的小程序页面
                wx.miniProgram.navigateTo({url: path});
            </if>

    });
    // 切换支付方式

    function get_h5_pay(){
      var pay_radio =  $('input[name="pay_radio"]').val();
      if(pay_radio=='pay_code=weixin'){

          $.ajax({
              type : "POST",
              url:"{:U('Mobile/Payment/getH5Code')}",//+tab,
              data : $('#cart4_form').serialize(),// 你的formid
              dataType: "json",
              success: function(data){
                  //将返回值赋值给href跳转支付
                  if(data){
                      $("#get_pay").attr("href",data);
                  }

                  console.log(data);
              }
          });





      }


    }


    function change_pay(obj)
    {
        $(obj).parent().siblings('input[name="pay_radio"]').trigger('click');
    }

    function pay(){
        $('#cart4_form').submit();
        return;
        //微信JS支付
    }
</script>
<include file="Public/footer"/>
</div>
<include file="Public/footer_nav"/>
</body>
</html>